package com.ideal.ete.collector.dao.hbase;

import org.apache.hadoop.hbase.TableName;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.FactoryBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Repository;

import com.ideal.ete.collector.dao.TraceDao;
import com.ideal.ete.collector.hbase.HBaseTables;

/**
 * TraceDao Factory for compatibility
 * 
 * @author Woonduk Kang(emeroad)
 */
@Repository
public class HbaseTraceDaoFactory implements FactoryBean<TraceDao> {

	private final Logger logger = LoggerFactory.getLogger(this.getClass());

	@Autowired
	@Qualifier("hbaseTraceDaoV2")
	private TraceDao v2;

	@Override
	public TraceDao getObject() throws Exception {
		return v2;

	}

	@Override
	public Class<?> getObjectType() {
		return TraceDao.class;
	}

	@Override
	public boolean isSingleton() {
		return true;
	}
}
